package edu.hawaii.wicket.page.util;

import org.apache.wicket.ResourceReference;
import org.apache.wicket.markup.html.image.Image;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.model.Model;
import edu.hawaii.wicket.page.BasePage;
import edu.hawaii.wicket.page.lighting.LightingPage;
import edu.hawaii.wicket.page.ac.ACPage;
import edu.hawaii.wicket.page.aquaponics.AquaponicsPage;
import edu.hawaii.wicket.page.security.SecurityPage;
import edu.hawaii.wicket.page.water.WaterPage;
/**
 * 
 * @author kurtteichman
 *
 */
public class UtilPage extends BasePage {

  private static final long serialVersionUID = 1L;
  
  private static final ResourceReference RESOURCE_REF = new ResourceReference(UtilPage.class,
          "Utilities.png");
  
  private static final ResourceReference SIDE_BAR = new ResourceReference(
          UtilPage.class,"side-bar.png");
  private static final ResourceReference LOGO = new ResourceReference(
          UtilPage.class,"logo.png");

  /**
   * Creates the utilities page. 
   */
  public UtilPage() {
    //add( new Image( "image","image.jpg" ) ) ;
    add(new Image("image", new Model<ResourceReference>(RESOURCE_REF)));
    add(new Image("sidebar", new Model<ResourceReference>(SIDE_BAR)));
    add(new Image("logo", new Model<ResourceReference>(LOGO)));

    add(new Link<String>("LightingPageLink") {
      private static final long serialVersionUID = 1L;
      /** Upon clicking this link, go to HomePage. */
      @Override
      public void onClick() {
        setResponsePage(new LightingPage());
      }
      }
    );
    
    add(new Link<String>("ClimatePageLink") {
      private static final long serialVersionUID = 1L;
      /** Upon clicking this link, go to ListPage. */
      @Override
      public void onClick() {
        setResponsePage(new ACPage());
      } 
      }
    );
    
    add(new Link<String>("SecurityPageLink") {
      private static final long serialVersionUID = 1L;
      /** Upon clicking this link, go to FormPage. */
      @Override
      public void onClick() {
        setResponsePage(new SecurityPage());
      }
      }
    );
    
    add(new Link<String>("WaterPageLink") {
      private static final long serialVersionUID = 1L;
      /** Upon clicking this link, go to TablePage. */
      @Override
      public void onClick() {
        setResponsePage(new WaterPage());
      }
      }
    );
    
    add(new Link<String>("AquaponicsPageLink") {
      private static final long serialVersionUID = 1L;
      /** Upon clicking this link, go to TablePage. */
      @Override
      public void onClick() {
        setResponsePage(new AquaponicsPage());
      }
      }
    );
  }
}
